package thread;
class Print implements Runnable{

    @Override
    public void run() {
        int i = 1;
        while (i <= 30){
            System.out.println(Thread.currentThread().getName()
            +"运行"+(i++));
        }
    }
}
public class Test {
    public static void main(String[] args) {
        Print pr = new Print();
        Thread thread = new Thread(pr);
        thread.start();
        Thread thread1 = new Thread(pr);
        thread1.start();
    }
}
